﻿/*
 * ©2009-2010 XELF
 * http://xelf.info
 */

namespace XELF.Framework {

	public partial struct Quaternion {
		/// <summary>
		/// 内積
		/// </summary>
		/// <param name="a"></param>
		/// <param name="b"></param>
		/// <returns></returns>
		public static float Dot(Quaternion a, Quaternion b) {
			float result;
			Dot(ref a, ref b, out result);
			return result;
		}
		/// <summary>
		/// 内積
		/// </summary>
		/// <param name="a"></param>
		/// <param name="b"></param>
		/// <param name="result"></param>
		public static void Dot(ref Quaternion a, ref Quaternion b, out float result) {
			result = a.X * b.X + a.Y * b.Y + a.Z * b.Z + a.W * b.W;
		}
	}

}
